package com.ruoyi.cs.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.cs.domain.vo.TBackPackVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 盲盒对战信息对象 t_battle_info
 * 
 * @author ruoyi
 * @date 2021-08-05
 */
@Data
public class TBattleInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 对战台ID */
    @Excel(name = "对战房间ID")
    @ApiModelProperty(value = "对战房间ID")
    private String battleId;

    /** 房主ID */
    @Excel(name = "房主ID")
    @ApiModelProperty(value = "房主ID")
    private String homeownerUserid;

    /** 花费金额 */
    @Excel(name = "花费金额")
    @ApiModelProperty(value = "花费金额")
    private BigDecimal homeownerCost;

    /** 对战的状态： 0 待加入  1 已结束 */
    @Excel(name = "对战的状态： 0-等待中  1-对战中  2-已结束 ")
    @ApiModelProperty(value = "对战的状态： 0-等待中  1-对战中  2-已结束 ")
    private String battleStatus;

    /** 胜方用户ID */
    @Excel(name = "胜方用户ID")
    @ApiModelProperty(value = "胜方用户ID")
    private String winnerUserid;

    /** 对战时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "对战时间")
    @ApiModelProperty(value = "对战时间")
    private Date battleTime;

    /** 标识符： 0 正常 1 停用 2 删除 */
    @Excel(name = "标识符： 0 正常 1 停用 2 删除")
    @ApiModelProperty(value = "标识符： 0 正常 1 停用 2 删除")
    private String delFlag;

    /** 版本号 */
    @Excel(name = "版本号")
    @ApiModelProperty(value = "版本号")
    private Long version;

    @ApiModelProperty(value = "对战模式")
    private Integer battleMode;

    /**对战用户*/
    @ApiModelProperty(value = "对战用户")
    private List<TBattleUser> tBattleUserList;

    /**房主名*/
    @ApiModelProperty(value = "房主名")
    private String homeownerUserName;

    /**创建盲盒对战数量*/
    @ApiModelProperty(value = "创建盲盒对战数量")
    private Integer num;

    /**创建对战时前端提供的箱子ID集合*/
    @ApiModelProperty(value = "创建对战时前端提供的箱子ID集合")
    private List<String> boxIds;

    /**获胜者名称*/
    @ApiModelProperty(value = "获胜者名称")
    private String winnerUserName;

    @ApiModelProperty(value = "房主用户头像")
    private String homeownerUserPic;

    @ApiModelProperty(value = "用户头像")
    private String userPic;

    /**用户ID*/
    @ApiModelProperty(value = "用户ID")
    private String userId;

    /**对战列表中的箱子信息*/
    @ApiModelProperty(value = "对战列表中的箱子信息")
    private List<TBattleBox> boxList;

    /**房间详情页面展示的状态 0 房主本人查看未结束的房间 1 待用户加入  2 已对战并获胜  3 已对战输了 4 并不在对战中的用户查看已经结束的房间详情 */
    @ApiModelProperty(value = "房间详情页面展示的状态 0 房主本人查看未结束的房间 1 待用户加入  2 已对战并获胜  3 已对战输了 4 并不在对战中的用户查看已经结束的房间详情 ")
    private String displayStatus;

    /**获胜者所得所有饰品*/
    @ApiModelProperty(value = "获胜者所得所有饰品")
    private List<TBackpack> winnerBackpackList;

    /**失败者所得保底饰品*/
    @ApiModelProperty(value = "失败者所得保底饰品")
    private List<TBackpack> failnerBackpackList;

    private String type;

    /***是否是房主创建的 0 是 1 否*/
    @ApiModelProperty(value = "是否是房主创建的 0 是 1 否")
    private String homeownerLoginStatus;

    /**获胜者所得所有饰品*/
    @ApiModelProperty(value = "获胜者开出的饰品")
    private List<TBackpack> winnerOpenGoodsList;

    /**失败者所得保底饰品*/
    @ApiModelProperty(value = "失败者开出的饰品")
    private List<TBackpack> failnerOpenGoodsList;


    @ApiModelProperty(value = "对战类型 0会员对战 1官方对战")
    private String battleType;

    @ApiModelProperty(value = "商城购买额度扣除  0是 1否")
    private String deduct;

    @ApiModelProperty(value = "是否参与当前对战房间 0是 1否")
    private String partake;

    @ApiModelProperty(value = "当前用户获得的全部饰品")
    private List<TBackPackVo> currentAllObtained;

    @ApiModelProperty(value = "当前用户获得的全部饰品总金额")
    private BigDecimal currentAllObtainedPrice;

    @ApiModelProperty(value = "是否选择机器人")
    private Boolean chooseRobot;

    @ApiModelProperty(value = "机器人id")
    private String robatId;

    @ApiModelProperty(value = "当前用户对战状态  0 失败方 1 胜者方  2 平手")
    private String currentDzStatus;

    @ApiModelProperty(value = "价格所属区间类型")
    private String costRangeType;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "主播创建的粉丝对战是设置的参与密码")
    private String fanPwd;

    @Override
    public int hashCode() {
        return Objects.hash(battleId, homeownerUserid, homeownerCost, battleStatus, winnerUserid, battleTime, delFlag, version, tBattleUserList, homeownerUserName, num, boxIds, winnerUserName, homeownerUserPic, userPic, userId, boxList, displayStatus, winnerBackpackList, failnerBackpackList, type, homeownerLoginStatus, winnerOpenGoodsList, failnerOpenGoodsList,getPageNum(),getPageSize());
    }
    private Boolean isFanPwd;

    private BigDecimal winUserGoodsPrice;


    @ApiModelProperty(value = "日充值额度")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private BigDecimal dailyRechargeAmount;

    @ApiModelProperty(value = "总充值额度")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private BigDecimal totalRechargeAmount;

    @ApiModelProperty(value = "对战人数")
    private Integer battleNum;
}
